﻿using KinonekoSoftware.CodariaDB.Documents.TemplateContents.Abilities;
using KinonekoSoftware.CodariaDB.Documents.TemplateContents.Weapons;
using KinonekoSoftware.CodariaDB.Documents.Theories.Elements;
using KinonekoSoftware.CodariaDB.Documents.Theories.Rarities;

namespace KinonekoSoftware.CodariaDB.Documents.TemplateContents
{
    public abstract class TemplatedContent : DeltaObject
    {
        public          string               Name  { get; set; }
        public          string               Intro { get; set; }
        public abstract TemplatedContentType Type  { get; }

    }

    public static class TemplatedContentStatic
    {
        public static TemplatedAbilityContent CreateTemplatedAbilityContent(
            string           id,
            TheoryEngine_Element _theory_element,
            TheoryEngine_Rarity   _theory_rarity) => new TemplatedAbilityContent
        {
            Id        = id,
            Name      = "天刑之刺",
            Intro     = "向目标方向投掷一把由火元素汇聚而成能量长矛，长矛掠过的地面位置会形成造成火焰伤害的火径，并在最终落点的位置爆炸，造成大量伤害。",
            Vocabularies     = new List<ColoredVocabulary>(),
            Keywords  = new List<ColoredKeyword>(),
            RarityID  = _theory_rarity.GetDefaultObject(),
            ElementID = _theory_element.GetDefaultObject(),
            SyncFlags = SyncResult.Never,
        };

        public static TemplatedWeaponContent CreateTemplatedWeaponContent(
            string               id,
            TheoryEngine_Element _theory_element,
            TheoryEngine_Rarity  _theory_rarity) => new TemplatedWeaponContent
        {
            Id        = id,
            Name      = "天刑之刺",
            Intro     = "向目标方向投掷一把由火元素汇聚而成能量长矛，长矛掠过的地面位置会形成造成火焰伤害的火径，并在最终落点的位置爆炸，造成大量伤害。",
            Vocabularies     = new List<ColoredVocabulary>(),
            Keywords  = new List<ColoredKeyword>(),
            RarityID  = _theory_rarity.GetDefaultObject(),
            ElementID = _theory_element.GetDefaultObject(),
            SyncFlags = SyncResult.Never,
        };

        public static TemplatedMineralContent CreateTemplatedMineralContent(string id) => new TemplatedMineralContent
        {
            Id             = id,
            Name           = "天刑之刺",
            Intro          = "向目标方向投掷一把由火元素汇聚而成能量长矛，长矛掠过的地面位置会形成造成火焰伤害的火径，并在最终落点的位置爆炸，造成大量伤害。",
            ProducingAreas = new List<string>(),
            Ingredients    = new List<NatureMineralIngredients>
            {
                new NatureMineralIngredients { Id = ID.Get(), Name = "矿物 #1", Color = "#888800", Value = 340 },
                new NatureMineralIngredients { Id = ID.Get(), Name = "矿物 #2", Color = "#DF8A2B", Value = 160 },
                new NatureMineralIngredients { Id = ID.Get(), Name = "矿物 #3", Color = "#7668ff", Value = 180 },
                new NatureMineralIngredients { Id = ID.Get(), Name = "矿物 #4", Color = "#20955b", Value = 60 },
                new NatureMineralIngredients { Id = ID.Get(), Name = "矿物 #5", Color = "#4eddff", Value = 260 },
            },
            SyncFlags      = SyncResult.Never,
        };
    }
}